<#if hasModule>
package ${customParentPackage};
<#else >
package ${package.Parent};
</#if>

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
<#if !formBean.staticRoute || formBean.springCloud>
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

@EnableDiscoveryClient
</#if>
@SpringBootApplication
public class ${dashedToCamel(formBean.artifactId)}Application {
    /**
    * 注意：使用步骤
    <#if !formBean.staticRoute>
    * 启动nacos
    * 在ttxs项目中启动ttxs-gateway、ttxs-uaa
    <#elseif formBean.springCloud>
    * 启动nacos
    * 启动api-gateway
    </#if>
    * 请在${formBean.artifactId}-ui目录中运行yarn install安装前端依赖，运行yarn serve启动前端项目
    */
    public static void main(String[] args) {
        SpringApplication.run(${dashedToCamel(formBean.artifactId)}Application.class, args);
    }
}

<#function dashedToCamel(s)>
    <#return s
    ?replace('(^-+)|(-+$)', '', 'r')
    ?replace('\\-+(\\w)?', ' $1', 'r')
    ?replace('([A-Z])', ' $1', 'r')
    ?capitalize
    ?replace(' ' , '')
    ?cap_first
    >
</#function>